﻿@model IList<ProductOverviewModel>
@using Nop.Web.Models.Catalog;
@if (Model.Count > 0)
{
    <nav class="sidebar light">
        <ul>
            <li class="title">
                @T("Products.RecentlyViewedProducts")
            </li>
            @for (int i = 0; i < Model.Count; i++)
            {
                var product = Model[i];
                <li @(i == Model.Count - 1 ? @Html.Raw(" class=\"last\"") : null) class="stick">
                    <a href="@Url.RouteUrl("Product", new { SeName = product.SeName })" class="product-name">
                        @if (!String.IsNullOrEmpty(product.DefaultPictureModel.ImageUrl))
                        {
                            <div class="product-picture">
                                <img alt="@product.DefaultPictureModel.AlternateText" src="@product.DefaultPictureModel.ImageUrl" title="@product.DefaultPictureModel.Title" />
                            </div>
                        }
                        @product.Name
                    </a>
                </li>
            }
        </ul>
    </nav>
}